using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class cleaning : MonoBehaviour
{
    private Animator anim;
    // Start is called before the first frame update
    void Start()
    {
        anim = GetComponent<Animator>();
      

    }

    private void OnTriggerEnter2D(Collider2D collision)
    { 
        if (collision.tag == "vacuum")
        {
            anim.Play("dirt cleaning");
        }
        else if(collision.tag == "low")
        {
            anim.Play("idleDirt");

        }
        else
        {
            anim.Play("dirt cleaning");
        }
    }

    
}
